export class UrlTools {
    /**获取url参数 */
    public static GetQuery(key: string): string {
        let query = location.search.substring(1);
        if (query.startsWith("?")) query = query.substring(1, query.length - 1);
        let vars = query.split("&");
        for (let i = 0; i < vars.length; i++) {
            let pair = vars[i].split("=");
            if (pair[0] == key) {
                return pair[1];
            }
        }
        return null;
    }
}